home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / DeveloperStax.cpt / Developer Stack 1.2r / card_11180.txt < prev    next >
Text File  |  1989-02-26  |  2KB  |  81 lines

  1. -- card: 11180 from stack: in.2r
  2. -- bmap block id: 0
  3. -- flags: 4000
  4. -- background id: 3837
  5. -- name: FileModDate
  6. ----- HyperTalk script -----
  7. on closecard
  8.   hide message window
  9. end closecard
  10.  
  11.  
  12. -- part 2 (button)
  13. -- low flags: 00
  14. -- high flags: A004
  15. -- rect: left=231 top=244 right=297 bottom=290
  16. -- title width / last selected line: 0
  17. -- icon id / first selected line: 27056 / 27056
  18. -- text alignment: 1
  19. -- font id: 0
  20. -- text size: 12
  21. -- style flags: 0
  22. -- line height: 16
  23. -- part name: Try this
  24. ----- HyperTalk script -----
  25. on mouseUp
  26.   if the optionkey is down then pass mouseup
  27.   put "Select a file..."
  28.   put filename() into thisfile
  29.   put "Created on " into info
  30.   convert fileModDate(thisfile,true) to short date
  31.   put it after info
  32.   put "; Modified on " after info
  33.   convert fileModDate(thisfile,false) to short date
  34.   put it after info
  35.   put info
  36. end mouseUp
  37.  
  38.  
  39.  
  40. -- part contents for background part 5
  41. ----- text -----
  42. FileModDate
  43.  
  44. -- part contents for background part 10
  45. ----- text -----
  46. 6
  47.  
  48. -- part contents for background part 6
  49. ----- text -----
  50.  
  51. This can be used to get the creation or modification date of a file, or as a 'File exists' utility.
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60. Thanks to:
  61. Dewi Williams
  62. 2227 Juniper Court
  63. Boulder CO 80302
  64. (303) 443 9038
  65. Delphi: DEWI
  66.  
  67.  
  68. -- part contents for background part 7
  69. ----- text -----
  70. Syntax:
  71.  
  72. FileModDate(<"PathName">,
  73. <needCreation>)
  74.  
  75. Returns the date of the last modification of the file in ticks, or empty ("") if there is an error.
  76.  
  77.  
  78. "PathName" is the full pathname to the target.
  79.  
  80. <needCreation> can be true or false.  If it is true, the function will return the creation date, otherwise it will return the modification date.
  81.